package com.example.studyproject.QRCode;

import cn.hutool.core.util.CharsetUtil;
import com.google.zxing.EncodeHintType;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: StudyProject
 * @description: 二维码解析类
 * @author: kangwei
 * @create: 2024-08-13 15:32
 **/
@Component
public class QRCodeHandler {


    public Map<EncodeHintType, Object> getHits() {
        Map<EncodeHintType, Object> hintTypeObjectMap = new HashMap<>(16);
        hintTypeObjectMap.put(EncodeHintType.CHARACTER_SET, CharsetUtil.CHARSET_UTF_8);
        hintTypeObjectMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.M);
        hintTypeObjectMap.put(EncodeHintType.MARGIN, 2);
        return hintTypeObjectMap;
    }
}
